#include <stdio.h>  
#include <string.h>  
#include <math.h>  
int a[15];  
  
int main() {  
    int max = 0, min = 2147483647, temp = 0, cnt = -1;  
    char c;  
    while (1) {  
        if (scanf("%c", &c));  
        if (c >= '0' && c <= '9') {  
            a[++cnt] = c - '0' + 0;  
            temp = 0;  
            for (int i = cnt; i > -1; i--)  
                temp += pow(10, cnt - i) * a[i];  
            max = max > temp ? max : temp;  
            min = min < temp ? min : temp;  
            cnt = -1;  
            continue;  
        }  
        switch (c) {  
            case ',':  
                continue;  
            case '+':  
                printf("%d+%d=%d\n", max, min, max + min);  
                return 0;  
            case '-':  
                printf("%d-%d=%d\n", max, min, max - min);  
                return 0;  
            case '*':  
                printf("%d*%d=%d\n", max, min, max * min);  
                return 0;  
            case '/':  
                if (min == 0)  
                    printf("Error!\n");  
                else  
                    printf("%d/%d=%d\n", max, min, max / min);  
                return 0;  
            case '%':  
                printf("%d%%%d=%d\n", max, min, max % min);  
                return 0;  
        }  
    }  
    return 0;  
}  